home *** CD-ROM | disk | FTP | other *** search
- Path: prairienet.org!sjmccaug
- From: sjmccaug@prairienet.org (Scott J. McCaughrin)
- Newsgroups: comp.lang.c++
- Subject: Re: Why are 32 bit better than 16 bit pgms?
- Date: 19 Jan 1996 12:50:10 GMT
- Organization: University of Illinois at Urbana
- Message-ID: <4do422$jj1@vixen.cso.uiuc.edu>
- References: <4dniuk$lms@dragon.solect.com> <30FBFFE6.1FEB@netcom.com>
- Reply-To: sjmccaug@prairienet.org (Scott J. McCaughrin)
- NNTP-Posting-Host: firefly.prairienet.org
-
-
- In a previous article, gallantm@kanservu.ca (Matt Gallant) says:
-
- >In article <30FBFFE6.1FEB@netcom.com>, vain@netcom.com says...
- >>
- >>I have a simple questions:
- >>
- >> What's are 32 bit pgms better than 16 bit programs?
- >>
- >> Thanks!
- >
- >The answer to this question can be a matter of opinion. The common answers
- >given are:
- >
- >1. For developers, programming becomes easier because you no longer have to
- >worry about memory segmentation. Because of this, data structures and blocks
- >are no longer limited to 64K. No more segment:offset addressing. Your
- >program can "pretend" that memory is a "flat" range, and just use 32-bit pointers
- >ranging from byte 0 through 4GB. (Of course, not all of this memory area is valid
- >to the process without making the proper memory allocations)
- >
-
- But with "huge" memory model permits the 64K limit to be exceeded in the
- real-mode model, and not everyone considers segmented memory a constraint.
-
- >2. 32-bit programs are pre-emptively multitasked. A 32-bit application can no
- >longer hog the process by not yielding on a timely basis. (There is one snag to
- >this scheme if you're running on Windows 95, and if you develop for Windows 95
- >you are sure to hear about it. This "snag" is refered to as the Win16Lock or
- >Win16Mutex.)
-
- This is more a feature of Win95 than the memory model -- besides, there are
- advantages to non-preemptive multitasking. Also, consider CDOS and Concurrent
- PC-DOS.
-
- >
- >3. 32-bit programs are (to a large extent) portable. If written correctly, one set
- >of source files can be compiled and run on Windows 95 and Windows NT, as well
- >as being compiled for other non-Intel x86 platforms (i.e. Alpha processors).
-
- I believe Win95 supports 16-bit code for backward compatibility as well.
-
- >
- >4. Also, consider that as new APIs are developed (by Microsoft and 3rd parties)
- >that they will probably only be ported to the Win32 platforms. For example, I
- >was just reading an Microsoft Systems Journal article about their new Speech API.
- > I'm not sure that it's necessarily 32-bit only, but obviously, something as
- >processing-intensive as speech synthesis and speech recognition will benefit from
- >32-bits.
- >
- >5. Last, but definitely not least, 32-bit programs are allowed to have multiple
- >threads of execution. This allows you to easily create and execute routines "in the
- >background" just by creating a new thread. You no longer have to set up your
- >different tasks to be done and come up with ways of switching between them
- >yourself, just create a new thread, and Win32 platforms will schedule your
- >background tasks themselves.
- >
- So what? This is the standard for OS/2 as well, which is designed to run in
- '286 protected-mode (only 24-bit addressing, not 32-bit). Again, this is more
- a feature of the operating system than the memory model.
-
- -- Scott McC.
-
-